<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@taglib uri="/struts-tags" prefix="s"%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OA协同办公系统</title>
<link type="text/css" rel="stylesheet" href="css/table.css">
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/openwindow.js"></script>
<script type="text/javascript" src="js/file.js"></script>

<script src="js/My97DatePicker/WdatePicker.js" type="text/javascript" ></script>
		<style type="text/css">
		body,td,th {
			font-family: "宋体";
			font-size: 12px;
		}
		.sendtd{border-bottom:#F00 double 1px}
		td{ color:#F00}
		.ztable{margin:15px 0 15px 0}
		</style>
	<script type="text/javascript">
		function printDoc(){
			window.print();
		}
		
function wordChange(val) {
	var id=$("#contentid").val();
	var docId=$("#docId").val();
	var url = "wordChange.action?contentId=" + id+"&editType="+val+"&docId="+docId;
	 openWindow(url,screen.width,screen.height);
}
		
function flowLook(val) {
	var url = "flowLook.action?flowId="+val;
	openWindow(url, 680, 600);
}

function download() {
	var fileId = $("#fileArray").val();
	if (fileId != "" && fileId != "null") {
		var param = {"fileArray":fileId};
		$.post("getFileList.action", param, function (data) {
			var list = data.fileList;
			for (var i = 0; i < list.length; i++) {
				$("#filetable").prepend("<tr><td><input type=\"checkbox\" name=\"checkbox2\" id=\"" + list[i].id + "\" value=\"" + list[i].id + "\" />&nbsp;<a href=\"downLoadFile.action?fileId=" + list[i].id + "\">" + list[i].name + "</a>&nbsp;</tr>");
			}
		}, "json");
	}
}
</script>
  </head >
  
<body onload="download();" >
<form action="" method="post" name="documentForm" >
<table>
 <tr>
            <td height="30" colspan="2">
            	<input type="button" class="button_04"  value="流程查看" onclick="flowLook('${document.processId}');" />
            	<input type="button" class="button_04"  value="打印" onclick="printDoc();" />
            </td>
          </tr>
          </table>
<h1 align="center"style="color:#F00; font-weight:bold">${document.flowName}</h1>
<hr size="2" width="750px" color="#FF0000" />
<input type="hidden" name="document.fileArray" id="fileArray" value="${document.fileArray}">
<input type="hidden" id="docId" name="document.id" value="${document.id}">
<input type="hidden" id="contentid" name="document.contentId" value="${document.contentId}">
<input type="hidden" id="templateId" name="document.template" value="${document.template}">

<table align="center" width="750px" border="0">
		<tr>
            <td colspan="2"> 
           <input class="button_04" type="button" id="zwbj" value="查看正文" onclick="wordChange('-1,1,0,0,0,0,0');" />
            </td>
          </tr>
  <tr>
    <td class="sendtd">
    <table class="ztable" width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="30" colspan="2">附件：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <table id="filetable">
			</table>
            </td>
          </tr>
          <tr>
            <td width="10%" height="80" valign="middle"> 
            附件表述：
            </td>
            <td width="90%" valign="middle">&nbsp;<font  color="#000000">${document.fjbs}</font></td>
          </tr>
    	</table>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
  <table  class="ztable" width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="60%" >文头：&nbsp;<font  color="#000000">${document.top}</font></td>
            <td>发文字号：&nbsp;<span>
			  <font  color="#000000">${document.postFont1}&nbsp;${document.postFont2}&nbsp;${document.postFont3}</span><font color="#000000">号</font></td>
          </tr>
        </table>
    </td>
  </tr>
    <tr>
    <td class="sendtd">
  <table  class="ztable" width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="60%" >缓急程度：&nbsp;<font  color="#000000">${document.hjStatu}</font></td>
            <td>印发日期：&nbsp;<font  color="#000000">${document.printTime}</font></td>
          </tr>
        </table>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ztable">
      <tr>
            <td>发文标题：</td>
          <td><input readonly="readonly" id="ztc" value="${document.title}" name="document.them" readonly="readonly" style=" width:600px;background:none;border-bottom: 0px; border-left:none; border-right:none; border-top:none" /></td>
          </tr>    
    </table>
</td>
  </tr>
  <tr>
    <td class="sendtd">
    	<div class="ztable">
    		主题词：&nbsp;
            <input readonly="readonly" id="ztc" value="${document.them}" name="document.them" readonly="readonly" style=" width:550px;background:none;border-bottom: 0px; border-left:none; border-right:none; border-top:none" />
      </div>
	</td>
  </tr>
  <tr>
    <td class="sendtd"><table class="ztable" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="10%" height="20" >主送：</td>
        <td>
        	<input readonly="readonly" id="zs" value="${document.them }" name="document.sendFrom" readonly="readonly" style=" width:550px;background:none;border-bottom: 0px; border-left:none; border-right:none; border-top:none" />
        </td>
      </tr>
      <tr>
        <td height="20">抄送：</td>
        <td>
        	<input readonly="readonly" name="document.writeFrom" value="${document.writeFrom }"  id="cs" readonly="readonly" style=" width:550px;background:none;border-bottom: 0px; border-left:none; border-right:none; border-top:none" />
        </td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="sendtd">
    	<div class="ztable">拟文单位：&nbsp;
        	<input readonly="readonly" id="nwdw" value="${document.draftOrg }" name="document.draftOrg" readonly="readonly" style=" width:400px;background:none;border-bottom: 0px; border-left:none; border-right:none; border-top:none" />
        </div>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
    	<div class="ztable">拟稿人：&nbsp;
        	<input readonly="readonly" id="ngr" value="${document.draftName }" name="document.draftName" readonly="readonly" style=" width:300px;background:none;border-bottom: 0px; border-left:none; border-right:none; border-top:none" />
        </div>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
    	<div class="ztable">
    	<table><tr><td width="100px">承办单位意见：</td>
    		<td>${document.orgSugesstion}</td></tr>
    		</table> 
        </div>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
    	<div class="ztable">
    	<table><tr><td width="100px">会签：</td>
    		<td>${document.counterSign}</td></tr>
    		</table> 
        </div>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
        <div class="ztable">
        <table><tr><td width="100px">核稿：</td>
    		<td>${document.checkDraft}</td></tr>
    		</table> 
        </div>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
    	 <div class="ztable">
    	 <table><tr><td width="100px"> 审阅意见：</td>
    		<td>${document.syyj}</td></tr>
    		</table>
      	 </div>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
    	<div class="ztable">
    	<table><tr><td width="100px">审核意见：</td>
    		<td>${document.shyj}</td></tr>
    		</table>
		</div>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
    	<div class="ztable">
    	<table><tr><td width="100px">签发：</td>
    		<td>${document.signOff}</td></tr>
    		</table>
	  </div>
    </td>
  </tr>
  <tr>
    <td class="sendtd">
    	<div class="ztable">共印：
        	 <font color="black">${document.print}</font>&nbsp;份
        </div>
    </td>
  </tr>
</table>
<table align="center" width="750px">
	<tr><td id="info" style="color: red;">${document.supervision }</td></tr>
</table>
</form>
</body>
</html>